// 库存管理的api接口
import { $$get, $get, $post } from '@/utils/requestLes';

// 车辆查询
export function getCarInventoryPage(data: any) {
  return $post('/carInventory/getCarInventoryPage', data);
}

// 车辆删除
export function deleteCarInventory(data: any) {
  return $post('/carInventory/deleteCarInventory', data);
}

// 车辆新增和修改
export function saveOrUpdateCarInventory(data: any) {
  return $post('/carInventory/saveOrUpdateCarInventory', data);
}

// 查询班组
export function getTeamPage(data: any) {
  return $post('/team/getTeamPage', data);
}

// 删除班组
export function deleteTeam(data: any) {
  return $post('/team/deleteTeam', data);
}

// 修改和新增班组
export function saveOrUpdateTeam(data: any) {
  return $post('/team/saveOrUpdateTeam', data);
}

// 查询班组成员
export function getTeamMemberPage(data: any) {
  return $post('/teamMember/getTeamMemberPage', data);
}

// 删除班组
export function deleteTeamMember(data: any) {
  return $post('/teamMember/deleteTeamMember', data);
}

// 修改和新增班组
export function saveOrUpdateTeamMember(data: any) {
  return $post('/teamMember/saveOrUpdateTeamMember', data);
}

// 配送日计划-查询AO列表
export function queryAOList(data: any) {
  return $post('/deliveryTask/getPendingDistributionPlan', data);
}

// 配送计划-查询物料
export function queryAoBillInfoList(data: any) {
  return $post('/lesDeliveryPlanController/queryAoBillInfoList', data);
}

// 库位管理查询
export function getCarLocation(data: any) {
  return $post('/carLocation/queryCarLocationPage', data);
}

// 库位管理保存
export function saveOrUpdateLocation(data: any) {
  return $post('/carLocation/saveOrUpdateLocation', data);
}

// 库位管理删除
export function deleteLocation(data: any) {
  return $post('/carLocation/deleteLocation', data);
}

// 空料车库位管理
export function getCarLocationEmpty(data: any) {
  return $post('/carLocationEmpty/getCarLocationEmpty', data);
}

// 空料车库位管理
export function getCarTaskPage(data: any) {
  return $post('/carTask/getCarTaskPage', data);
}

// 配送计划查看当前托盘下的AO
export function queryAOByToolCode(data: any) {
  return $post('/lesDeliveryPlanController/queryAOByDistributionPlanVo', data);
}

// agv任务撤销
export function cancelTask(data: any) {
  return $post('/carTask/cancelTask', data);
}

// agv任务详情
export function queryAgvStatus(data: any) {
  return $post('/carTask/queryAgvStatus', data);
}

// 配送任务-下发任务
export function queryOut(data: any) {
  return $post('/deliveryTask/generateDeliveryTask', data);
}

// 查询配送任务
export function queryDeliveryTask(data: any) {
  return $post('/deliveryTask/queryDeliveryTaskPage', data);
}

// 查询配送任务
export function callTray(data: any) {
  return $post('/deliveryTask/callTray', data);
}

// 小车查询
export function queryCarList(data: any) {
  return $post('/compackageAoQueryController/queryCarList', data);
}

// agv任务详情
export function queryWorkbinToolInfo(data: any) {
  return $post('/compackageAoQueryController/queryWorkbinToolInfo', data);
}

// agv下发计划
export function queryWorkbinMatchInfo(data: any) {
  return $post('/compackageAoQueryController/queryWorkbinMatchInfo', data);
}

// 大件车辆维护查询
export function searchMsLargeVehicle(data: any) {
  return $post('/msLargeVehicle/queryPage', data);
}

// 大件车辆维护保存
export function saveMsLargeVehicle(data: any) {
  return $post('/msLargeVehicle/saveOrUpdateLargeVehicle', data);
}

// 大件车辆维护删除
export function delMsLargeVehicle(data: any) {
  return $post('/msLargeVehicle/deleteLargeVehicle', data);
}

// 调度任务查询
export function searchCarTask(data: any) {
  return $post('/carTask/queryPageList', data);
}

// 调度任务撤销
export function cancelCarTask(data: any) {
  return $get('/carTask/carTaskCode', data);
}

// 配送小车查询
export function searchByCar(data: any) {
  return $post('/car/queryCarList', data);
}
// 配送小车保存
export function saveByCar(data: any) {
  return $post('/car/saveOrUpdateCar', data);
}

// 大件库存查询
export function largeInventoryQuery(data: any) {
  return $post('/lesLargeInventory/queryPageList', data);
}

// 查询所有库位
export function queryAllCarLocation() {
  return $$get('/carLocation/queryAllCarLocation');
}

// 手动执行
export function manualDelivery(data: any) {
  return $get('/agv/manualDelivery',data);
}
